import 'package:nyh_motorcade_app/entity/cash_flow_details_entity.dart';

cashFlowDetailsEntityFromJson(CashFlowDetailsEntity data, Map<String, dynamic> json) {
	if (json['id'] != null) {
		data.id = json['id'] is String
				? int.tryParse(json['id'])
				: json['id'].toInt();
	}
	if (json['name'] != null) {
		data.name = json['name'].toString();
	}
	if (json['code'] != null) {
		data.code = json['code'].toString();
	}
	if (json['uuid'] != null) {
		data.uuid = json['uuid'].toString();
	}
	if (json['operateType'] != null) {
		data.operateType = json['operateType'].toString();
	}
	if (json['accountType'] != null) {
		data.accountType = json['accountType'].toString();
	}
	if (json['amount'] != null) {
		data.amount = json['amount'] is String
				? double.tryParse(json['amount'])
				: json['amount'].toDouble();
	}
	if (json['transAmount'] != null) {
		data.transAmount = json['transAmount'] is String
				? double.tryParse(json['transAmount'])
				: json['transAmount'].toDouble();
	}
	if (json['beforeTransAmount'] != null) {
		data.beforeTransAmount = json['beforeTransAmount'] is String
				? double.tryParse(json['beforeTransAmount'])
				: json['beforeTransAmount'].toDouble();
	}
	if (json['afterTransAmount'] != null) {
		data.afterTransAmount = json['afterTransAmount'] is String
				? double.tryParse(json['afterTransAmount'])
				: json['afterTransAmount'].toDouble();
	}
	if (json['recordType'] != null) {
		data.recordType = json['recordType'].toString();
	}
	if (json['recordTypeName'] != null) {
		data.recordTypeName = json['recordTypeName'].toString();
	}
	if (json['operateUser'] != null) {
		data.operateUser = json['operateUser'].toString();
	}
	if (json['desc'] != null) {
		data.desc = json['desc'].toString();
	}
	if (json['operateTime'] != null) {
		data.operateTime = json['operateTime'].toString();
	}
	if (json['stationName'] != null) {
		data.stationName = json['stationName'].toString();
	}
	if (json['tradingAccount'] != null) {
		data.tradingAccount = json['tradingAccount'].toString();
	}
	if (json['tradingAccountCode'] != null) {
		data.tradingAccountCode = json['tradingAccountCode'].toString();
	}
	if (json['tradingAccountType'] != null) {
		data.tradingAccountType = json['tradingAccountType'].toString();
	}
	if (json['tradingAccountAfterTransAmount'] != null) {
		data.tradingAccountAfterTransAmount = json['tradingAccountAfterTransAmount'] is String
				? double.tryParse(json['tradingAccountAfterTransAmount'])
				: json['tradingAccountAfterTransAmount'].toDouble();
	}
	if (json['receiptsWayName'] != null) {
		data.receiptsWayName = json['receiptsWayName'].toString();
	}
	if (json['rechargeNo'] != null) {
		data.rechargeNo = json['rechargeNo'].toString();
	}
	if (json['accountNumber'] != null) {
		data.accountNumber = json['accountNumber'].toString();
	}
	if (json['openingBank'] != null) {
		data.openingBank = json['openingBank'].toString();
	}
	if (json['accountName'] != null) {
		data.accountName = json['accountName'].toString();
	}
	if (json['transferNo'] != null) {
		data.transferNo = json['transferNo'].toString();
	}
	if (json['rechargeTime'] != null) {
		data.rechargeTime = json['rechargeTime'].toString();
	}
	if (json['operatorName'] != null) {
		data.operatorName = json['operatorName'].toString();
	}
	if (json['rechargeImages'] != null) {
		data.rechargeImages = (json['rechargeImages'] as List).map((v) => v.toString()).toList().cast<String>();
	}
	if (json['orderQuantity'] != null) {
		data.orderQuantity = json['orderQuantity'] is String
				? double.tryParse(json['orderQuantity'])
				: json['orderQuantity'].toDouble();
	}
	if (json['orderAmount'] != null) {
		data.orderAmount = json['orderAmount'] is String
				? double.tryParse(json['orderAmount'])
				: json['orderAmount'].toDouble();
	}
	if (json['price'] != null) {
		data.price = json['price'] is String
				? double.tryParse(json['price'])
				: json['price'].toDouble();
	}
	if (json['customersName'] != null) {
		data.customersName = json['customersName'].toString();
	}
	if (json['vehicleNumber'] != null) {
		data.vehicleNumber = json['vehicleNumber'].toString();
	}
	if (json['oilName'] != null) {
		data.oilName = json['oilName'].toString();
	}
	if (json['tradingTime'] != null) {
		data.tradingTime = json['tradingTime'].toString();
	}
	if (json['driverName'] != null) {
		data.driverName = json['driverName'].toString();
	}
	if (json['driverPhone'] != null) {
		data.driverPhone = json['driverPhone'].toString();
	}
	if (json['signatureImage'] != null) {
		data.signatureImage = json['signatureImage'].toString();
	}
	if (json['vehicleMileage'] != null) {
		data.vehicleMileage = json['vehicleMileage'] is String
				? double.tryParse(json['vehicleMileage'])
				: json['vehicleMileage'].toDouble();
	}
	if (json['vehicleMileageImage'] != null) {
		data.vehicleMileageImage = json['vehicleMileageImage'].toString();
	}
	if (json['joinInSmallTicketImage'] != null) {
		data.joinInSmallTicketImage = json['joinInSmallTicketImage'].toString();
	}
	if (json['gunScreenImage'] != null) {
		data.gunScreenImage = json['gunScreenImage'].toString();
	}
	if (json['tradingSerialNumber'] != null) {
		data.tradingSerialNumber = json['tradingSerialNumber'].toString();
	}
	if (json['stationAddressDetail'] != null) {
		data.stationAddressDetail = json['stationAddressDetail'].toString();
	}
	if (json['greaseGunNo'] != null) {
		data.greaseGunNo = json['greaseGunNo'].toString();
	}
	if (json['operator'] != null) {
		data.operator = json['operator'].toString();
	}
	if (json['contactsPhone'] != null) {
		data.contactsPhone = json['contactsPhone'].toString();
	}
	if (json['valid'] != null) {
		data.valid = json['valid'] is String
				? int.tryParse(json['valid'])
				: json['valid'].toInt();
	}
	if (json['validOperatorName'] != null) {
		data.validOperatorName = json['validOperatorName'].toString();
	}
	if (json['validTime'] != null) {
		data.validTime = json['validTime'].toString();
	}
	if (json['smallTicketImage'] != null) {
		data.smallTicketImage = json['smallTicketImage'].toString();
	}
	return data;
}

Map<String, dynamic> cashFlowDetailsEntityToJson(CashFlowDetailsEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['code'] = entity.code;
	data['uuid'] = entity.uuid;
	data['operateType'] = entity.operateType;
	data['accountType'] = entity.accountType;
	data['amount'] = entity.amount;
	data['transAmount'] = entity.transAmount;
	data['beforeTransAmount'] = entity.beforeTransAmount;
	data['afterTransAmount'] = entity.afterTransAmount;
	data['recordType'] = entity.recordType;
	data['recordTypeName'] = entity.recordTypeName;
	data['operateUser'] = entity.operateUser;
	data['desc'] = entity.desc;
	data['operateTime'] = entity.operateTime;
	data['stationName'] = entity.stationName;
	data['tradingAccount'] = entity.tradingAccount;
	data['tradingAccountCode'] = entity.tradingAccountCode;
	data['tradingAccountType'] = entity.tradingAccountType;
	data['tradingAccountAfterTransAmount'] = entity.tradingAccountAfterTransAmount;
	data['receiptsWayName'] = entity.receiptsWayName;
	data['rechargeNo'] = entity.rechargeNo;
	data['accountNumber'] = entity.accountNumber;
	data['openingBank'] = entity.openingBank;
	data['accountName'] = entity.accountName;
	data['transferNo'] = entity.transferNo;
	data['rechargeTime'] = entity.rechargeTime;
	data['operatorName'] = entity.operatorName;
	data['rechargeImages'] = entity.rechargeImages;
	data['orderQuantity'] = entity.orderQuantity;
	data['orderAmount'] = entity.orderAmount;
	data['price'] = entity.price;
	data['customersName'] = entity.customersName;
	data['vehicleNumber'] = entity.vehicleNumber;
	data['oilName'] = entity.oilName;
	data['tradingTime'] = entity.tradingTime;
	data['driverName'] = entity.driverName;
	data['driverPhone'] = entity.driverPhone;
	data['signatureImage'] = entity.signatureImage;
	data['vehicleMileage'] = entity.vehicleMileage;
	data['vehicleMileageImage'] = entity.vehicleMileageImage;
	data['joinInSmallTicketImage'] = entity.joinInSmallTicketImage;
	data['gunScreenImage'] = entity.gunScreenImage;
	data['tradingSerialNumber'] = entity.tradingSerialNumber;
	data['stationAddressDetail'] = entity.stationAddressDetail;
	data['greaseGunNo'] = entity.greaseGunNo;
	data['operator'] = entity.operator;
	data['contactsPhone'] = entity.contactsPhone;
	data['valid'] = entity.valid;
	data['validOperatorName'] = entity.validOperatorName;
	data['validTime'] = entity.validTime;
	data['smallTicketImage'] = entity.smallTicketImage;
	return data;
}